package com.xywl.escort.view.home;

import com.xywl.escort.base.BasePresenter;
import com.xywl.escort.base.BaseView;
import com.xywl.escort.bean.BannerResp;
import com.xywl.escort.bean.BaseResp;
import com.xywl.escort.bean.IsRedPacketResp;
import com.xywl.escort.bean.MarketDataBean;
import com.xywl.escort.bean.NoticeResp;
import com.xywl.escort.bean.ProjectListResp;
import com.xywl.escort.bean.UpgradeResp;

import java.util.List;

public class HomeContract {

    interface Presenter extends BasePresenter {
        void takeView(HomeContract.View view);

        void loadBanner();

        void loadNotice(String userId);

        void loadProjectList(int pageSize);

        void loadMarketList(String userId);

        void findIsNewMessage(String userId);

        void upgrade(int updateObject, int versionCode);

        void isRedPacket(int bizCode);

        void processRedPacket(int bizCode);
    }

    interface View extends BaseView<Presenter> {

        void loadBannerSuccess(BannerResp resp);

        void loadBannerFailure();

        void updateNotice(NoticeResp.DataBean dataBean);

        void loadNoticeFailure(String msg);

        void updateProjectList(ProjectListResp.DataBean dataBean);

        void loadProjectFailure();

        void updateMarketList(List<MarketDataBean> dataBeans);

        void loadMarketFailure();

        void newMessage();

        void noNewMessage();

        void findIsNewMessageFailure();

        void hasUpgrade(UpgradeResp.DataBean dataBean);

        void isRedPacketSuccess(IsRedPacketResp.DataBean dataBean);

        void isRedPacketFailure();

        void processRedPacketSuccess(BaseResp resp);

        void processRedPacketFailure(String msg);
    }
}
